﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace weikebuluo.Common
{
    /// <summary>
    /// DataTableHelper 的摘要说明
    /// </summary>
    public class DataTableHelper
    {
        public DataTableHelper()
        { }

        /// <summary>
        /// DataTable 排序 
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static DataTable DataTableSort(DataTable dt, string sort)
        {
            DataView dv = dt.DefaultView;
            dv.Sort = sort;
            DataTable newdt = dv.ToTable();

            return newdt;
        }
    }
}
